<div class="order">
    <div class="item-category">
        <ul>
            <li style="color: #FC9F01;">
                Kết quả tìm kiếm
            </li>
        </ul>
    </div>
    <div class="order-item">
        <ul>
            <li class="title-first">Sắp xếp:</li>
            <li>
                <a class="<?php echo ($orderType == 'id-down') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('id-down', '<?php echo $page; ?>')">ID giảm</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'id-up') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('id-up', '<?php echo $page; ?>')">ID tăng</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'date-down') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('date-down', '<?php echo $page; ?>')">Ngày đăng giảm</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'date-up') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('date-up', '<?php echo $page; ?>')">Ngày đăng tăng</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'price-down') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('price-down', '<?php echo $page; ?>')">Giá giảm</a>
            </li>
            <li>
                <a class="<?php echo ($orderType == 'price-up') ? 'selected' : ''; ?>" onclick="AdminController.searchProduct('price-up', '<?php echo $page; ?>')">Giá tăng</a>
            </li>
            <li>
                <a>Đơn hàng</a>
            </li>
        </ul>
    </div>

</div>
<div>
    <table cellpadding="0" cellspacing="0" width="100%" align="left" class="table-list">
        <col >
        <col >
        <col >
        <col >
        <col >
<?php foreach ($aryProduct as $key => $value) { ?>
        <tr class="<?php echo ($key % 2 == 0) ? 'alt' : '' ?>">

            <td class="product-img">
                <div>
                    <a href="<?php echo $root_page; ?>/product/<?php echo $value['product_id']; ?>/<?php echo $value['product_title_filter']; ?>.html">
                        <img src="<?php echo $value['product_main_image']; ?>" border="0" align="middle">
                    </a>
                </div>
            </td>
            <td>
                <div class="product-name">
                    <a  href="<?php echo $root_page; ?>/product/<?php echo $value['product_id']; ?>/<?php echo $value['product_title_filter']; ?>.html"><?php echo $value['product_title']; ?></a>
                </div>
                <div class="product-des">
<?php echo $value['product_highlight']; ?>
                </div>
            </td>
            <td class="list_product_detail">
<?php if ($value['product_price_active_km'] == 1) { ?>
                <div class="older_price">
                    Giá cũ : <?php echo number_format($value['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ
                </div>
                <div>
                    Giá KM : <?php echo number_format($value['product_price_vnd_km'], 0, ',', '.'); ?>&nbsp;VNĐ
                </div>
<?php } else { ?>
                <div>
                    Giá :<?php echo number_format($value['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ
                </div>
<?php } ?>

                <div>
<?php if ($value['product_is_vat'] == 1) { ?>
                    (Có VAT)
<?php } else { ?>
                    (Chưa có VAT)
<?php } ?>
                </div>
                <div>
                    Bảo hành :&nbsp;<?php echo $value['product_warranty_name']; ?>
                </div>
                <div>
                    Trong kho :&nbsp;<?php echo $value['product_store_name']; ?>
                </div>
                <div>
                    Khuyến mại :&nbsp;<?php echo $value['product_promotional']; ?>
                </div>
            </td>
            <td>
                <div>
                    Danh mục
                </div>
                <div>
                     <?php echo $value['product_category_name'];?>
                </div>
                <div>
                    Người đăng: <?php echo $value['product_creator_name'];?>
                </div>
                <div>
                    Ngày đăng: <?php echo date('d/m/Y', strtotime($value['product_created_date']))?>
                </div>
                <div>
                    Người cập nhật: <?php echo $value['product_updater_name'];?>
                </div>
                <div>
                    Ngày cập nhật: <?php echo date('d/m/Y', strtotime($value['product_updated_date']))?>
                </div>
            </td>
            <td>
                <div>
<?php if ($perProductEdit == 2 || $isMaster == 1) { ?>
                    <span class="cpointer" onclick="AdminController.editProduct('<?php echo $value['product_id']; ?>', '<?php echo $value['product_category_id']; ?>');"><img src="/public/images/form/icon-edit.gif" title="Sửa sản phẩm này"></span>
<?php } ?>
                </div>
            </td>
            <td>
                <div>
<?php if ($perProductDelete == 3 || $isMaster == 1) { ?>
                    <span class="cpointer" onclick="AdminController.deleteProduct('<?php echo $value['product_id']; ?>');"><img src="/public/images/form/delete.png" title="Xóa sản phẩm này"></span>
<?php } ?>
                </div>
            </td>
        </tr>
<?php } ?>

        </table>

    </div>
    <div class="clear"></div>
    <div align="right"><?php echo $strPaging; ?></div>